{% load staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="{% static 'layui/css/layui.css' %}" rel="stylesheet">
    <script src=" {% static 'layui/layui.js' %}"></script>
    <title>Title</title>
</head>
<body>
<form class="layui-form" actin="" method="">
    {% csrf_token %}
    <div class="layui-form-item">
        <label class="layui-form-label" >设备名</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="device_name" value='{{ obj.device_name }}'>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">设备类型</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="device_type" value=" {{ obj.device_type }}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">设备平台</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="device_platform" value="    {{ obj.device_platform }}
">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">CPU类型</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="cpu_type" value="{{ obj.cpu_type }}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">内存</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="mem_num" value="{{ obj.mem_num }}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">高低端</label>
        <div class="layui-inpu-block">
            <input type="text" class="layui-input" name="level" value="{{ obj.level }}">
        </div>
    </div>
    {{ obj.hot }}
    <div class="layui-form-item">
        <label class="layui-form-label">是否热门</label>
        <div class="layui-inpu-block">
            <input type="radio" name="hot" value="1" title="是">
            <input type="radio" name="hot" value="0" title="否">
        </div>
    </div>
    {{ obj.borrow }}
    <div class="layui-form-item">
        <label class="layui-form-label">借还</label>
        <div class="layui-input-block">
            {#            //name标签一定需要有，后面form表单的提交中，data的数值就是通过那么的值来拿的#}
            <input type="radio" name="borrow" value="1" title="可借" checked=" ">
            <input type="radio" name="borrow" value="0" title="已借出">
        </div>
    </div>
    {{ obj.version }}
    <div class="layui-form-item">
        <label class="layui-form-label">版本</label>
        <div class="layui-input-block">
            {#            //name标签一定需要有，后面form表单的提交中，data的数值就是通过那么的值来拿的#}
            <select id="version" name="version">
                <option value=""></option>
                <option value="7.0">7.0</option>
                <option value="8.0">8.0</option>
                <option value="9.0">9.0</option>
                <option value="10.0">10.0</option>
                <option value="11.0">11.0</option>
                <option value="12.0">12.0</option>
            </select>
        </div>
    </div>
</form>
<script>
layui.use(['form'],function () {
    var form = layui.form;
})
</script>
</body>
</html>